<?php
//操作日志模型
namespace King\Model;
use Think\Model;

/**
 * 模型
 */
class actionlogModel extends Model{
    
    protected $tableName = 'actionlog';

    /**
     * 自动完成
     * @var array
     */
    protected $_auto = array(
    );


    /*
     * 自动验证
     */
    protected $_validate = array(
     );
    
    /*
     * 获取列表
     */
    public function getActionlogList($where,$page){
        //TODOTODO
        $res = $this->where($where)->page($page,100)->select();
        return $res;
    }
    
    /*
     * 获取列表,不分页
     */
    public function getActionlogLists($where){
        //TODOTODO
        $res = $this->where($where)->select();
        return $res;
    }
    
    /*
     * 统计数量
     */
    public function getActionlogCount($where){
        $res = $this->where($where)->count();
        return $res;
    }
    
    /*
     * 添加
     */
    public function addActionlog($data){
        $res = $this->add($data);
        return $res;
    }
    
    /*
     * 获取信息
     */
    public function getActionlog($where){
        $res = $this->where($where)->find();
        return $res;
    }
	
    /*
     * 编辑信息
     */
    public function editActionlog($where,$data){
        return $this->where($where)->save($data);
    }
    
    
}
